package com.shensi.api.admin.client.label;

import com.shensi.api.admin.client.fallback.label.LabelRuleDetailClientFallBack;
import com.shensi.api.admin.domian.label.dto.LabelRuleDetailDto;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.page.TableDataInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = LabelRuleDetailClientFallBack.class)
@Component
public interface LabelRuleDetailClient {

    /**
     * 查询标签规则明细列表
     */
    @GetMapping("/label/detail/list")
    public TableDataInfo list(@SpringQueryMap LabelRuleDetailDto labelRuleDetail);

    @GetMapping("/label/detail/detailList")
    public TableDataInfo detailList(@SpringQueryMap LabelRuleDetailDto labelRuleDetail);

    /**
     * 导出标签规则明细列表
     */
    @GetMapping("/label/detail/export")
    public AjaxResult export(@SpringQueryMap LabelRuleDetailDto labelRuleDetail);
    /**
     * 获取标签规则明细详细信息
     */
    @GetMapping(value = "/label/detail/{id}")
    public AjaxResult getInfo(@PathVariable("id") Integer id);

    /**
     * 新增标签规则明细
     */
    @PostMapping("/label/detail")
    public AjaxResult add(@RequestBody LabelRuleDetailDto labelRuleDetail);

    /**
     * 修改标签规则明细
     */
    @PutMapping("/label/detail")
    public AjaxResult edit(@RequestBody LabelRuleDetailDto labelRuleDetail);

    @PostMapping(value ="/label/detail/deleteLabelRuleDetail")
    public AjaxResult deleteLabelRuleDetail(@RequestBody LabelRuleDetailDto labelRuleDetail);


    /**
     * 删除标签规则明细
     */
    @DeleteMapping("/label/detail/{ids}")
    public AjaxResult remove(@PathVariable("ids") Integer[] ids);

}
